from flask import Flask
from flask_cors import CORS
from controller.smartBadgeController import smartBadge
from controller.assistantLoginController import assistantLogin
from controller.recordingMinutesController import recordingMinutes



from flask import Flask, request, send_file, render_template
from pydub import AudioSegment
import io
import os
import datetime
import librosa
import soundfile as sf


# from libs import realTimeSpeechRecognition
from libs import realTimeSpeechRecognition_join
from utils  import util
from utils  import qwen_util
import ssl





# from controller.index_controller_2 import index_2
# from controller.index_controller_3 import index_3

app = Flask(__name__)
CORS(app)  # 为整个应用启用CORS

app.register_blueprint(smartBadge, url_prefix="/smartBadge")          #   http://192.168.0.168:5000/smartBadge/record
app.register_blueprint(assistantLogin, url_prefix="/assistantLogin")
app.register_blueprint(recordingMinutes, url_prefix="/recordingMinutes")




# app.register_blueprint(index_2, url_prefix="/it1996")
# app.register_blueprint(index_3, url_prefix="/it1997")

if __name__ == "__main__":

    # 生成自签名证书（开发环境）
    # context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
    # context.load_cert_chain('cert.pem', 'key.pem')  # 需要生成证书文件





    # app.run(host='localhost', port=5000, debug=True)

    app.run(host="0.0.0.0", port=5000, debug=True)





#你的私人令牌123456已生成     58274916e5e9c992897ce3a301e871a1

#User:19146900265    password:  qy156#914*




